﻿using System;
using System.Runtime.InteropServices;
using LprConfiger.Winform;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace UnitTestProject
{
    [TestClass]
    public class DtoTest
    {
        [TestMethod]
        public void TestStructSize()
        {
            Assert.AreEqual(179, Marshal.SizeOf(typeof(CFGInfo))); 
            Assert.AreEqual(6, Marshal.SizeOf(typeof(CFGSysCtrl)));
            Assert.AreEqual(39, Marshal.SizeOf(typeof(CFGSysService)));
            Assert.AreEqual(488, Marshal.SizeOf(typeof(CFGCamera)));
            Assert.AreEqual(13, Marshal.SizeOf(typeof(CFGOSDFlag)));
            Assert.AreEqual(5, Marshal.SizeOf(typeof(CFGText)));
            Assert.AreEqual(265, Marshal.SizeOf(typeof(CFGVideoStore)));
            Assert.AreEqual(13, Marshal.SizeOf(typeof(CFGPoliceOutput)));
            Assert.AreEqual(14, Marshal.SizeOf(typeof(CFGLane)));
            Assert.AreEqual(237, Marshal.SizeOf(typeof (CFGPoliceLamp)));
            Assert.AreEqual(394, Marshal.SizeOf(typeof(CFGPoliceEvent)));
            Assert.AreEqual(9, Marshal.SizeOf(typeof(CFGReco)));


        }
    }
}
